package com.it.a02polymorphismdemo2;

public class Cat extends Animal {
    public Cat() {
    }

    public Cat(int age, String color) {
        super(age, color);
    }

    /*
    eat(String something)方法
    逮老鼠catchMouse方法
     */
    public void eat(String something) {
        System.out.println(getAge()+"岁的"+getColor()+"的猫眯着眼睛侧着头吃"+something);
    }

    public void catchMouse(){
        System.out.println("逮老鼠");
    }
}
